﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Classic.Master" Inherits="ModelViewPage<IList<VisitInfoDto>>" %>

<%@ Import Namespace="MvcContrib.UI.Grid" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        Dzisiejsze wizyty</h2>
    <%=Html.Grid(Model).Columns(column => {
            column.For(v => v.PatientName).Named("Pacjent");
            column.For(v => v.Date.ToShortTimeString())
                .Named("Godzina")
                .Attributes(@class => "center");
            column.For(v => String.Format("{0} {1} {2}",
                                Html.ActionLink("Przyjmij", "Create", "Entry", new { id = v.Id }, null).ToString(),
                                Html.ActionLink("Karta", "PatientCard", "Entry", new {id = v.PatientId }, null).ToString(),
                                Html.ActionLink("Usuń", "Delete", "Visit", new { id = v.Id }, null)))                            
                .Named("Akcje")
                .DoNotEncode()
                .Attributes(@class => "center");
        }).Empty("Nie znaleziono wizyt") %>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
</asp:Content>
